/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package base;

import java.io.Serializable;
import java.util.Hashtable;
import java.util.Vector;

/**
 *
 * @author Tue
 */
public class WaveEnvironment implements Serializable{
    private Hashtable<String, Vector> frontalTable;
    private String CONTENT;
    private String LINK;
    private String PREDECESSOR;
    private int color = 1;
    private String trackAddress;
    private Mode waveMode;
    public WaveEnvironment(){
        frontalTable = new Hashtable<String, Vector>();
        waveMode = Mode.NAVIGATE;
    }
    public WaveEnvironment(WaveEnvironment waveEnv){
        this.frontalTable = new Hashtable<String, Vector>(waveEnv.getFrontalTable());
        this.CONTENT = waveEnv.getCONTENT();
        this.LINK = waveEnv.getLINK();
        this.PREDECESSOR = waveEnv.getPREDECESSOR();
        this.waveMode = waveEnv.getWaveMode();
        this.trackAddress = waveEnv.trackAddress;
        this.color = waveEnv.color;
    }
    public WaveEnvironment clone(){
        return new WaveEnvironment(this);
    }
    public Hashtable<String, Vector> getFrontalTable() {
        return frontalTable;
    }
    public int getColor(){
        return color;
    }
    public String getCONTENT(){
        return this.CONTENT;
    }

    public void setCONTENT(String CONTENT) {
        this.CONTENT = CONTENT;
    }

    public String getLINK() {
        return LINK;
    }

    public void setLINK(String LINK) {
        this.LINK = LINK;
    }
    
    public String getPREDECESSOR() {
        return PREDECESSOR;
    }

    public void setPREDECESSOR(String PREDECESSOR) {
        this.PREDECESSOR = PREDECESSOR;
    }

    public String getTrackAddress() {
        return trackAddress;
    }

    public void setTrackAddress(String trackAddress) {
        this.trackAddress = trackAddress;
    }

    public Mode getWaveMode() {
        return waveMode;
    }

    public void setWaveMode(Mode waveMode) {
        this.waveMode = waveMode;
    }

    public void setColor(int color){
        this.color =  color;
    }

    public void dump(){
        System.out.println("MODE: " + this.waveMode + " | WaveEnvironment{FRONTAL TABLE: " + frontalTable +
                " | CONTENT: " + getCONTENT() + " | LINK: " + getLINK() +
                " | PREDECESSOR: " + getPREDECESSOR() + 
                " | TRACK: " + this.trackAddress + "}");
    }
    public String toString(){
        return ("WaveEnvironment{MODE: " + this.waveMode + " | FRONTAL TABLE: " + frontalTable + " | CONTENT: " + getCONTENT() +
                " | LINK: " + getLINK() + " | PREDECESSOR: " + getPREDECESSOR()
                + " | TRACK: " + this.trackAddress + "}");
    }
    public enum Mode{NAVIGATE, CREATE}
}
